<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page import="com.yaodian100.ec.member.entity.Member"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.springframework.security.providers.encoding.Md5PasswordEncoder"%>
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<c:if test="${not empty memberGift && (memberGift.type!=3) }">
<script type="text/javascript" charset="UTF-8" src="/js/cart.js"></script>
<script type="text/javascript">
var hasTlProduct = 'false';
$().ready( function() {

	$("#msg_dialog").dialog({
		bgiframe: true,
		autoOpen: false,
		height: 150,
		width:350,
		modal: true
	});
	
	$("#check_exist").click(function(){
		$("#check_exist").hide();
		$("#fake").show();
		$("#goaddcart").click();
	});

	$("#msg_dialog_commit").click(function(){
		$("#msg_dialog").dialog('close');
	});

});

<!--
function toAddCartDetail(productId, spec, categoryPath, type){
	var error="";
	if($('#type').attr('value')=='1'){
		error+="预购商品只能直接购买！\r\n";
	} else {
		if($('#spec').attr('value')==''){
			error+="请选择商品属性！\r\n";
		}
	}
	var itemNo="itemNo:\""+productId+"\",";
	var specNo="specNo:\""+spec+"\",";
	var qty="qty:\"1\",";
	var categoryPath="categoryPath:\""+categoryPath+"\",";
	var type="type:\""+type+"\",";
	var webpath="webpath:\"<%=ServerValue.getFrontContextPath()%>/shopping/cart.do?\",";
	var presents="presents:null,";
	var addOns="addOns:null";
	var json="{";
	json+=itemNo;
	json+=specNo;
	json+=qty;
	json+=categoryPath;
	json+=type;
	json+=webpath;
	json+=presents;
	json+=addOns;
	json+="}";
	var jsonObj;
	eval("jsonObj="+json);
	addCart(jsonObj);
}
-->
</script>
</c:if>
</head>
<body> 
<div id="msg_dialog" class="member-reg-alert" style="display:none">
<p>赠品每人限领一次！<br/>&nbsp;&nbsp;</p>
<div align="center"><span style="text-align:center;"><a href="javascript:;" class="btn-mid" id="msg_dialog_commit">确定</a></span></div>
</div>
    <div id="main" class="member-reg">
        <h3>耀点100会员注册</h3>
        <img src="/images/union/union_regstep_3.gif" alt="注册流程3_注册成功" class="step-img" />
        <div class="ok-area" style="margin-left:170px">
        <c:choose>
			<c:when test="${not empty memberEvent}">
				<c:if test="${memberEvent.type == '2'}">
					<p>恭喜您注册成功，并获得<strong class="txt-rd">${memberEvent.amount}</strong>积分。</p>
				</c:if>
				<c:if test="${memberEvent.type == '1'}">
					<p>恭喜您注册成功，并获得<strong class="txt-rd">${memberEvent.amount}</strong>元礼券。</p>
				</c:if>
			</c:when>
			<c:otherwise>
				<p>注册成功，欢迎您加入耀点100！</p>
			</c:otherwise>
		</c:choose>	
          	
        	<p>您的帐户名为：<span class="txt-rd"><strong>${member.loginId}</strong></span><br />您也可以用注册邮箱作为帐户名登录耀点100。 </p>
        </div>
        <c:choose>
			<c:when test="${not empty memberGift}">
				<c:if test="${memberGift.type == '1' || memberGift.type == '2'}">
    				<p class="join-gift"><a href="javascript:;" id="check_exist"><img src="/images/join_gift_02.gif" alt="立即点击送赠品" width="244" height="72" /></a><a id="fake" style="display:none"><img src="/images/join_gift_02.gif" alt="立即点击送赠品" width="244" height="72" /></a><br /><span class="txt-rd">请点击以上连结将赠品加入购物车，否则您便放弃获得赠品机会。</span></p>
    				<a href="###" onclick="toAddCartDetail('${product.productId}', '${spec.specificationId}', '${product.mainCategoryID}', '${product.productType}')" title="立即点击送赠品" style="display:none;" id="goaddcart"></a>
    			</c:if>
    			<c:if test="${memberGift.type == '3'}">
    				<p class="join-gift"><a href="${memberGift.content}" title="点击享更多优惠 进入耀点100" target="_blank"><img src="/images/join_gift_01.gif" alt="点击享更多优惠 进入耀点100" width="244" height="72" /></a></p>
    			</c:if>
			</c:when>
			<c:otherwise>
				<c:if test="${not empty memberEvent && (memberEvent.type == '2')}">
         	  		<p class="join-gift"><a href="<%=ServerValue.getFrontContextPath()%>/member/myBonus/tomybonus.do" title="点击查看我的积分"><img src="/images/join_gift_03.gif" alt="点击查看我的积分" width="244" height="72" /></a></p>
          		</c:if>
			</c:otherwise>
		</c:choose>	
        <p class="link-home"><a href="<%=ServerValue.getFrontContextPath()%>/">回首页</a> | <a href="<%=ServerValue.getFrontContextPath()%>/member/myyaodian.do">我的耀点100</a></p>
        <div class="tips-li">
        <strong>提醒您：</strong>
          <ul>
            <li>请尽快至「<a href="<%=ServerValue.getFrontContextPath()%>/member/modifydata.do">我的耀点100 - 修改个人信息</a>」页面完善个人信息并验证，成功后，将赠送<em class="txt-rd">${completeInfoBonus}</em>积分！</li>
          </ul>
     </div>
    </div>
    <jsp:include page="/common/adv.jsp"/>
</body>
</html>